<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<link rel="stylesheet" type="text/css" href="../../../Themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="../../../Themes/icon.css">
		<link rel="stylesheet" type="text/css" href="../../../CSS/demo.css">
		<link rel="stylesheet" type="text/css" href="../../../CSS/common.css">

	</head>

	<body style="padding: 0px;">
		<div class="easyui-layout" style="width:100%;height:500px;">
			<div id="div_search" data-options="region:'north'" style="height:80px;">

			</div>
			<div data-options="region:'center'">
				<div class="easyui-panel" title="摊位情况" style="width: 100%;">
					<div style="overflow:hidden">
						<div>
							<table id="dg" class="table_style">
							</table>
						</div>
					</div>
				</div>
			</div>
		</div>

	</body>

	<script type="text/javascript" src="../../../JS/jquery.min.js"></script>
	<script type="text/javascript" src="../../../JS/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="../../../JS/common.js"></script>
	<script type="text/javascript" src="../../../JS/MarketShareFunction/SearchShareFunction.js"></script>
	<script>
		var listUrl = "";
		var searchType =  SEARCH_REGION+SEARCH_ORDER_NO+SEARCH_STATE;
		searchType += SEARCH_REGION_TYPE + SEARCH_HOUSE_NUMBER;
		var content = buildSearchOptions(searchType, "");
		$("#div_search").append(content);

		function doSearch() {
			var searchCondition = "";
			searchCondition = processSearchCondition();
			_url = RemoteLinkAddress + '/market/contract/statistics?' + searchCondition;
			$('#dg').datagrid('options').url = _url;
			$('#dg').datagrid('reload');
		}
		listUrl = RemoteLinkAddress + "/market/contract/statistics";
		getDataGrid();

		function getDataGrid() {

			$('#dg').datagrid({
				url: listUrl,
				method: 'get',
				pagination: 'true',
				rownumbers: 'true',
				autoRowHeight: 'true',
				fitColumns: 'false',
				singleSelect: 'true',
				height: 350,
				/*表格中的列名以及各自列名的ID*/
				columns: [
					[{
							field: 'ORDER_NO',
							title: '合同编号',
							width: '10%',
							align: 'center'
						}, {
							field: 'REGION_TYPE',
							title: '区域类型',
							width: '8%',
							align: 'center'
						}, {
							field: 'REGION_NAME',
							title: '区域名称',
							width: '8%',
							align: 'center'
						}, {
							field: 'HOUSE_NUMBER',
							title: '摊位门牌号',
							width: '5%',
							align: 'center'
						},
						{
							field: 'NAME',
							title: '商户名称',
							width: '8%',
							align: 'center'
						},
						{
							field: 'TELEPHONE',
							title: '电话号码',
							width: '8%',
							align: 'center'
						},
						{
							field: 'IDCARD',
							title: '身份证号码',
							width: '8%',
							align: 'center'
						}, {
							field: 'BEGIN_TIME',
							title: '开始时间',
							width: '10%',
							align: 'center',
						}, {
							field: 'END_TIME',
							title: '结束时间',
							width: '8%',
							align: 'center'
						},
						{
							field: 'STATE',
							title: '摊位状态',
							width: '8%',
							align: 'center'
						}, {
							field: 'SUM',
							title: '合同金额',
							width: '8%',
							align: 'center',
							formatter: function(value, row, index) {
								if(value) {
									return "￥" + value;
								}
							}
						},
						{
							field: 'MARGIN',
							title: '保证金',
							width: '8%',
							align: 'center',
							formatter: function(value, row, index) {
								if(value) {
									return "￥" + value;
								}
							}
						}, {
							field: 'OTHER_CHARGE',
							title: '其他费用',
							width: '8%',
							align: 'center',
							formatter: function(value, row, index) {
								if(value) {
									return "￥" + value;
								}
							}
						},

					]
				],

			});
		}
	</script>

</html>